unit Td_ProductCase_List;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, BaseDataListForm, cxGraphics, cxControls, cxLookAndFeels,
  cxLookAndFeelPainters, cxContainer, cxEdit, dxSkinsCore,
  dxSkinsDefaultPainters, cxStyles, dxSkinscxPCPainter,
  cxDataStorage, DB, cxDBData, cxGridCustomTableView,
  cxGridTableView, cxGridDBTableView, Menus, DBActns, StdActns,
  ActnList, ImgList, cxClasses, cxGridCustomView, cxGrid,
  cxLabel, ExtCtrls, MisString, cxCheckBox,
  Uni, StdCtrls, cxTextEdit, cxMaskEdit, cxDropDownEdit,
  cxGridCustomPopupMenu, dxSkinsForm, cxNavigator,
  System.Actions, cxCustomData, cxFilter, cxData, cxGridPopupMenu, MemDS,
  DBAccess, System.ImageList, cxGridLevel, cxButtons;

type
  TfrmTd_ProductCase_List = class(TfrmBaseDataListForm)
    create_date: TcxGridDBColumn;
    title: TcxGridDBColumn;
    content: TcxGridDBColumn;
    code: TcxGridDBColumn;
    Qry_product: TUniQuery;
    _productName: TcxGridDBColumn;
    _productSpec: TcxGridDBColumn;
    MainDataSetUid: TIntegerField;
    MainDataSetUproductid: TIntegerField;
    MainDataSetUcreate_date: TDateTimeField;
    MainDataSetUtitle: TStringField;
    MainDataSetUcontent: TStringField;
    MainDataSetUcode: TStringField;
    MainDataSetU_productName: TStringField;
    MainDataSetU_productSpec: TStringField;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  protected
    function AppendRecord: Boolean; override;
    function EditRecord: Boolean; override;
  public
    { Public declarations }
  end;

var
  frmTd_ProductCase_List: TfrmTd_ProductCase_List;

implementation
uses
  Td_ProductCase_Edit;
{$R *.dfm}

procedure TfrmTd_ProductCase_List.FormCreate(Sender: TObject);
begin
  FKeyField := 'id';
  FCodeField := 'code';
  FTableName := 'td_productcase';
  inherited;

end;

function TfrmTd_ProductCase_List.AppendRecord: Boolean;
begin
  ShowEditForm(frmTd_ProductCase_Edit, TfrmTd_ProductCase_Edit, et_New);
  Result := True;
end;

function TfrmTd_ProductCase_List.EditRecord: Boolean;
begin
  ShowEditForm(frmTd_ProductCase_Edit, TfrmTd_ProductCase_Edit, et_Modify);
  Result := True;
end;


end.

